package br.ufal.ic.util;

import br.ufal.ic.core.Address;
import br.ufal.ic.core.CubistInformation;
import br.ufal.ic.dao.UserDAO;
import br.ufal.ic.dao.hibernate.UserHibernateDAO;
import br.ufal.ic.user.User;
import java.util.Date;

/**
 *
 * @author Marcos Paulo
 */
public class Test {

    public static void main(String[] args) {

        UserDAO dao = new UserHibernateDAO();
//        CubistDAO dao = new CubistDAO();

        Address address = new Address("Rua doutor zeferino rodrigue", "maceio", "Brasil");
//        Cube cube = new Cube(CubeType.CUBE_3X3X3);
        CubistInformation information = new CubistInformation(
                "Marcos Paulo José de Melo Silva", address, new Date());

        User user = new User("marcospjms", "123456", information);
//        Competitor competitor = new Competitor(information, cube);
//        address.setCity("Maceio");
//        address.setCountry("Brasil");
//        address.setStreet("doutor zeferino rodrigues");

        HibernateUtil.beginTransaction();

        System.out.println(dao.findByNickName("marcospjms"));
        System.out.println(dao.findAll());
//        dao.save(user);

//        HibernateUtil.commit();




    }
}
